package photorganizer.common.transaction;

import photorganizer.common.bean.BeanHome;

public class TransactionHome {

	private static final TransactionManager transactionManager = BeanHome.get(TransactionManager.class);

	public static TransactionManager getTransactionManager() {
		return TransactionHome.transactionManager;
	}

	/**
	 * @see TransactionManager#isActive()
	 */
	public static boolean isActive() {
		return transactionManager.isActive();
	}

	/**
	 * @see TransactionManager#begin()
	 */
	public static void begin() {
		transactionManager.begin();
	}

	/**
	 * @see TransactionManager#commit()
	 */
	public static void commit() {
		transactionManager.commit();
	}

	/**
	 * @see TransactionManager#rollback()
	 */
	public static void rollback() {
		transactionManager.rollback();
	}

	private TransactionHome() {
		assert false;
	}

}
